﻿#region Header

/*
Remote views based on linq
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using System.Collections;
using System.Collections.Generic;
using Sebastof.Services.Interfaces;

#endregion

namespace Sebastof.ProcessChains.ProcessSteps {
	/// <summary>
	/// Description of the class
	/// </summary>
	public class FinalizerCollection : FinalizerBase<IEnumerable> {
		#region Public Methods

		// public methods located here
		protected override IEnumerable OnProcess(IEnumerable toProcess) {
			var handledObjects = new List<object>();
			foreach (object obj in toProcess) {
				if (obj is ISebastofApplicationObject) {
					HandleInterLinqApplicationObject(obj as ISebastofApplicationObject, handledObjects);
				}
				else {
					HandleObject(obj, handledObjects);
				}
			}
			return toProcess;
		}

		#endregion
	}
}